input_dir_a=$1
role=
if [[ $map_input_file == *${input_dir_a}* ]]; then
    role=A
else
    role=B
fi

awk -v role=$role '
    function https_to_http(url)
    {
        gsub("^https","http",url);
        return url;
    }
    #BEGIN{FS="\t";OFS="\t"}
    BEGIN{FS=" ";OFS="\t"}
    {print https_to_http(tolower($1)), role, $0}
' -
